# -*- coding: utf-8 -*-
# @Time        :2025/3/13 9:40
# @Author      :文刀水寿
# @File        : 34_爬虫_requests_post请求.py
"""
 @Description :
"""
import requests

url = 'https://fanyi.baidu.com/sug'

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0'
}

data = {
    'kw': 'spider'
}

response = requests.post(url=url, data=data, headers=headers)

content = response.text

import json

obj = json.loads(content)

print(obj)
